package com.founder.chd_daily_query.entity.query;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.sun.istack.Nullable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;


@Entity
@Table(name = "CONTRACT_TRANSPORT")
public class ContractTransportEntity {

    @Column(name = "CONTRACT_ID")
    private String contractId;

    @Id
    @Column(name = "CONTRACT_TRANSPORT_ID")
    private String contractTransportId;

    @Nullable
    @Column(name = "TRANS_AMOUNT")
    private Float transAmount;

    @Column(name = "MINE_ID")
    private String mineId;

    @Column(name = "STATION_B")
    private String stationB;

    @Column(name = "STATION_E")
    private String stationE;

    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @JSONField(format = "yyyy-MM-dd")
    @Column(name = "LAST_UPDATE_DATE")
    private Date lastUpdateDate;

    public String getContractId() {
        return contractId;
    }

    public void setContractId(String contractId) {
        this.contractId = contractId;
    }

    @Override
    public String toString() {
        return "ContractTransportEntity{" +
                "contractId='" + contractId + '\'' +
                ", contractTransportId='" + contractTransportId + '\'' +
                ", transAmount=" + transAmount +
                ", mineId='" + mineId + '\'' +
                ", stationB='" + stationB + '\'' +
                ", stationE='" + stationE + '\'' +
                ", lastUpdateDate=" + lastUpdateDate +
                '}';
    }

    public String getContractTransportId() {
        return contractTransportId;
    }

    public void setContractTransportId(String contractTransportId) {
        this.contractTransportId = contractTransportId;
    }

    public Float getTransAmount() {
        return transAmount;
    }

    public void setTransAmount(Float transAmount) {
        this.transAmount = transAmount;
    }

    public String getMineId() {
        return mineId;
    }

    public void setMineId(String mineId) {
        this.mineId = mineId;
    }

    public String getStationB() {
        return stationB;
    }

    public void setStationB(String stationB) {
        this.stationB = stationB;
    }

    public String getStationE() {
        return stationE;
    }

    public void setStationE(String stationE) {
        this.stationE = stationE;
    }

    public Date getLastUpdateDate() {
        return lastUpdateDate;
    }

    public void setLastUpdateDate(Date lastUpdateDate) {
        this.lastUpdateDate = lastUpdateDate;
    }
}
